package com.team1.trivia;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.drawable.GradientDrawable;
import android.graphics.drawable.GradientDrawable.Orientation;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class ScoringActivity extends Activity {
	private static int mCorrectId;
	private static int mSelectedId;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.scoring);

		GradientDrawable grad = new GradientDrawable(Orientation.TOP_BOTTOM,
				new int[] { Color.WHITE, Color.BLUE });
		this.getWindow().setBackgroundDrawable(grad);

		Button tryAgain = (Button) findViewById(R.id.restartBT);

		tryAgain.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				startActivity(new Intent(ScoringActivity.this,
						OpeningActivity.class));
				finish();
			}
		});
	}

	public static void setCorrectId(int correctId) {
		mCorrectId = correctId;
	}

	public static void setSelectedId(int selectedId) {
		mSelectedId = selectedId;
	}

	public static boolean checkAnswer() {
		return (mCorrectId == mSelectedId);
	}

	@Override
	protected void onPause() {
		// TODO Auto-generated method stub
		super.onPause();
	}

	@Override
	protected void onStop() {
		// TODO Auto-generated method stub
		super.onStop();
	}

}
